package main

import (
	"HeadLineNews/pkg/db/cache"
	"HeadLineNews/pkg/db/store"
	"HeadLineNews/pkg/snow"
	"HeadLineNews/pkg/zaplog"
	"HeadLineNews/router"
	"HeadLineNews/settings"
	"HeadLineNews/verify"
)

func main() {
	settings.InitProductionConfig() // 初始化项目配置
	zaplog.InitZapLog()             // 初始化日志配置
	defer zaplog.Sync()
	store.InitMySQLService() // 初始化 MySQL 服务
	cache.InitRedisService() // 初始化 Redis 服务
	snow.InitSnowFlake()     // 雪花算法
	verify.InitValidator()   // 在初始化路由之前初始化校验器

	//go vote.SyncScore()  // 同步分数

	router.StartServer()
}
